package com.ssy.lingxi.order.api.fallback;

import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.order.api.model.vo.paas.OrderPayChannelFeignVO;
import com.ssy.lingxi.order.api.model.vo.paas.OrderRuleFeignVO;
import com.ssy.lingxi.order.api.paas.OrderConfigFeignService;

import javax.validation.Valid;
import java.util.List;

/**
 * 订单服务配置接口Fallback
 * @author 万宁
 * @version 2.0.0
 * @date 2021-08-04
 */
public class OrderConfigFeignServiceFallback implements OrderConfigFeignService {
    /**
     * 同步更新平台规则配置
     *
     * @param rules 接口参数
     * @return 更新结果
     */
    @Override
    public Wrapper<Void> updateOrInsertOrderRules(@Valid List<OrderRuleFeignVO> rules) {
        return Wrapper.fail(ResponseCode.SERVICE_ORDER_ERROR);
    }

    /**
     * 同步更新支付方式与支付渠道状态
     *
     * @param payChannels 接口参数
     * @return 更新结果
     */
    @Override
    public Wrapper<Void> updateOrderPayChannelStatus(@Valid List<OrderPayChannelFeignVO> payChannels) {
        return Wrapper.fail(ResponseCode.SERVICE_ORDER_ERROR);
    }
}
